
<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>

<@head>
<link rel="stylesheet" href="/misc/app/css/product_list.css"/>
<link rel="stylesheet" href="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.css"/>
</@head>

<@body>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/misc/jquery-fileupload-9.14.0/jquery.ui.widget.js"></script>
<script src="/misc/jquery-fileupload-9.14.0/jquery.fileupload.js"></script>
<script>var PicDomain = "${PicDomain!}"</script>
<script src="/misc/app/js/activity_edit_detail.js"></script>
</@body>

<@layout_default>



<div  class="box" name="md_edit_activity">
	<!-- Nav tabs -->
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">活动详情</a></li>
        <li role="presentation"><a href="/activity/getActivityPrizeDetail?activityId=${activity.id?c}">中奖规则</a></li>
        <li role="presentation"><a href="/activity/getActivityAbstractDetail?activityId=${activity.id?c}">活动规则</a></li>
    </ul>
	
	<div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="home">
        	<div class="box-header with-border">
            <div class="modal-body">
                <form class="form-horizontal" name="form_edit_activity">
                    <input type="hidden" name="id" id="activityId" value="${activity.id}"/>
                    <input type="hidden" name="actTimeStart" id="actTimeStart" value="${activity.actTimeStart?number_to_datetime}"/>
                    <input type="hidden" name="actTimeEnd" id="actTimeEnd" value="${activity.actTimeEnd?number_to_datetime}"/>
                    <input type="hidden" id="channel_edit" value="${activity.channel}" />
                    <input type="hidden" id="backgroundImage1" value="${activity.backgroundImageGet!}" />
                    <input type="hidden" id="backgroundImageWin" value="${activity.backgroundImageWin!}" />
                    <input type="hidden" id="backgroundImageLos" value="${activity.backgroundImageLos!}" />
                    <input type="hidden" id="isLimitScanRegion" value="${activity.isLimitScanRegion!}" />
                    <input type="hidden" id="isAutoDraw_hidden" value="${activity.isAutoDraw!}"/>
                    
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label" name="namelabel"> 活动名称</label>
                        <div class="col-sm-10" style="width:50%;height:27px;padding-top:7.5px;">
                            ${activity.name!}
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label"> 活动区域</label>
                        <div class="col-sm-10" style="width:50%;height:27px;padding-top:7.5px;">
                            ${selectedRgn!}
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label">活动时间</label>
                        <div class="col-sm-10" id="daterange3_edit" name="daterange3_edit" style="width:50%;height:27px;padding-top:7.5px;">
                        </div>
                    </div>
                    <div class="form-group">
				        <label class="col-sm-2 control-label">自动抽奖</label>
				          <div class="col-sm-10" style="padding-top:7px;">
				          	<#if activity.isAutoDraw?exists>
				          		<#if activity.isAutoDraw == 1>是</#if>
				          		<#if activity.isAutoDraw == 0>否</#if>
				          	</#if>
                          </div>
				    </div>
                    
                    <div class="form-group" id="get_div">
                        <label class="col-sm-2 control-label">抽奖背景图</label>
                        <div class="col-sm-10">
                            <span class="ctn-product-pics" id="ctn_edit_product_pics"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">中奖背景图</label>
                        <div class="col-sm-10">
                            <span class="ctn-product-pics" id="ctn_edit_product_pics_win"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">未中奖背景图</label>
                        <div class="col-sm-10">
                            <span class="ctn-product-pics" id="ctn_edit_product_pics_nowin"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">渠道</label>
                        <div class="col-sm-10" style="width:50%;height:27px;padding-top:7.5px;">
                           ${activity.channel}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" name="namelabel"> 参奖基数</label>
                        <div class="col-sm-10" style="height:27px;padding-top:7.5px;">
                            ${activity.actBaseNub}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"> 活动商品</label>
                        
                    </div>
                    
                    <div class="form-group" id="selectedProDiv">
                        <label class="col-sm-2 control-label"></label>
                        <div class="col-sm-10">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>名称</th>
                                    <th>编号</th>
                                    <th>条码</th>
                                    <th>品牌</th>
                                </tr>
                            </thead>
                            <tbody id="product_table">
                                <#if selectedProductList?exists>
                                <#list selectedProductList as item1>
                                    <tr>
                                        <td>${item1.id}</td>
                                        <td>${item1.name}</td>
                                        <td>${item1.number}</td>
                                        <td>${item1.barcode}</td>
                                        <td>${item1.brandName!}</td>
                                    </tr>
                                </#list>
                                </#if>
                            </tbody>
                        </table>
                        </div>
                    </div>
                </form>
            </div>
            
    	</div>
        
        </div>
    </div>

    
</div>

</@layout_default>